﻿namespace IssueIT.Core.Domain.Model
{
	/// <summary>
	/// Containing the various status elements belonging to one issue
	/// </summary>
	public class Status
	{
		public Status() : this(State.New)
		{
		}

		public Status(State state) : this(state, Priority.Medium, Severity.Undecided)
		{
		}

		public Status(State state, Priority priority, Severity severity)
		{
			State = state;
			Priority = priority;
			Severity = severity;
		}

		public State State { get; private set; }
		public Priority Priority { get; private set; }
		public Severity Severity { get; private set; }
		public Assigment AssignedTo { get; private set; }
		public PointInTime PointInTime { get; private set; }

		public void Assign(Assigment assigment)
		{
			AssignedTo = assigment;
		}
	}
}